package com.sardine.base.esm.session;

import java.io.Closeable;
import java.util.List;

/**
 * 上海京东到家元信信息技术有限公司<br>
 * Created with IntelliJ IDEA.
 * Date:2017/5/22
 * Time:9:58
 *
 * @author daifeng<br>
 *         daifeng@imdada.cn
 * @since JDK 1.7 <br>
 * Copyright (c) 2017 imdada System Incorporated All Rights Reserved.
 */
public interface EsmSession extends Closeable {
    <T> T selectOne(String statement);
    <E> List<E> selectList(String statement);
    int insert(String statement);
    int update(String statement);
    int delete(String statement);
    /**
     * 获取类的映射
     * @param type
     * @param <T>
     * @return
     */
    <T> T getMapper(Class<T> type);

    /**
     * 得到ESM 相关配置信息
     * @return
     */
    Configuration getConfiguration();
}
